home *** CD-ROM | disk | FTP | other *** search
/ Extra! Mainframe / Extra! Mainframe for Windows 95.iso / snaserv / source / service.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-10-01  |  1.9 KB  |  67 lines

  1.  
  2. #ifdef _INITIALIZE_GLOBALS_
  3. #define EXTERN
  4. #else
  5. #define EXTERN extern
  6. #endif
  7.  
  8. #define ARGTEXT       "This function requires %d argument(s) from the .INF file.\n"
  9. #define ERRTEXT       "The call to %s returned error %d for the service named \"%s\".\n"
  10. #define OUTOFMEMORY   "Memory allocation failed (tried to get %d bytes)."
  11. #define WCBUFSIZE      128
  12. #define NAMEBUFSIZE    128
  13. #define RESULTBUFSIZE 4096
  14. #define DEPENDBUFSIZE  256
  15. #define SMALLBUFSIZE    16
  16. #define NUMCREATEARGS    7
  17. #define NUMDELETEARGS    1
  18. #define NUMSTOPARGS      1
  19. #define NUMQUERYARGS     1
  20. #define NUMSHAREARGS     3
  21. #define NUMSHDELETEARGS  1
  22. #define NUMADJUSTARGS    0
  23. #define NUMADMINARGS     0
  24. #define NUMDEBUGARGS     1
  25. #define NUMNOSARGS       0
  26. #define NUMDOMAINARGS    0
  27. #define NUMDIRCHECKARGS  1
  28. #define NUMGETSNAMEARGS  1
  29. #define NUMSHUTDOWNARGS  0
  30.  
  31. #define PERFNAME      "Software\\Microsoft\\Windows NT\\CurrentVersion\\Perflib"
  32. #define DRIVERNAME    "System\\CurrentControlSet\\Services"
  33. #define DUMPSCRNAME   "snadump.scr"
  34. #define DUMPSCRTEMP   "snadump.tmp"
  35.  
  36. #define LMDLL         "NETAPI32.DLL"
  37. #define NWDLL         "WSOCK32.DLL"
  38. #define ATDLL         "WSOCK32.DLL"
  39. #define IPDLL         "WSOCK32.DLL"
  40. #define BVDLL         "VNSAPI32.DLL"
  41. #define NBDLL         "WSOCK32.DLL"
  42. #define LMFUNC        "NetWkstaGetInfo"
  43. #define NWFUNC        "WSAStartup"
  44. #define ATFUNC        "WSAStartup"
  45. #define IPFUNC        "WSAStartup"
  46. #define NBFUNC        "WSAStartup"
  47.  
  48. #define NETUSEFUNC    "NetUseGetInfo"
  49. #define LMFUNC2       "NetWkstaGetInfo"
  50.  
  51. //
  52. // Function prototypes
  53. //
  54. BOOL SNAGetNosTypesInstalled( DWORD, LPSTR*, LPSTR* );
  55.  
  56. //
  57. // Global variables
  58. //
  59. EXTERN SC_HANDLE hSCManager;
  60. EXTERN SC_HANDLE hService;
  61. EXTERN SC_LOCK   lSCLock;
  62. EXTERN BOOL      fStatus;
  63. EXTERN WCHAR     wcNetName [ WCBUFSIZE ];
  64. EXTERN WCHAR     wcPathName[ WCBUFSIZE ];
  65. EXTERN WCHAR     wcRemark  [ WCBUFSIZE ];
  66. EXTERN CHAR      ResultBuf [ RESULTBUFSIZE ];
  67.